home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
AUTOCAD
/
1652.ZIP
/
MENU-SYS.ARC
/
HEADER15.ORG
< prev
next >
Wrap
Lisp/Scheme
|
1987-08-01
|
2KB
|
53 lines
;; (c)1987 R&J Computer Service
; RR #3 Box 183
; Albion, IN 46701
; Phone: Voice (219) 636-2460
; Data (219) 636-3153
; 24hrs 2400, 1200, 300 Baud 8-N-1
; Header.LSP adds Header Balloon and description to a detail drawing
; Written by John Kitt
; We are NOT responsable for the performance or accuracy of this LISP routine
; You are encouraged to copy and distribute this LISP routine
; provided this header section IS NOT REMOVED. For continued
; support and new LISP routines you are asked to mail a Registration
; fee of $10.00 to the above address. Thank You!!!
(defun *ERROR* (st) (princ (strcat "*" st)) ' *)
(defun C:HEADER ()
(setq ECHO (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command "GRAPHSCR")
(setq RAD 0
RAD1 (/ 270 57.29578)
PT1 (getpoint "\nEnter Header Balloon location: ")
HEDRAD 0.3125
TXTHT 0.25
OSET (* 0.268 (/ TXTHT 2.0))
TXTLOC (list (- (car PT1) OSET) (- (cadr PT1) (/ TXTHT 2.0)))
VAR 0)
(command "CIRCLE" PT1 HEDRAD)
(while (= VAR 0)
(setq HEDTXT (getstring "\nEnter Header number (2 char. max.): "))
(if (> (strlen HEDTXT) 2) (progn (setq VAR 0)
(princ "Invalid Entry....Too Many Charactors"))
(setq VAR 1)))
(command "TEXT" "C" TXTLOC TXTHT 0 HEDTXT)
(setq TMPHT1 (getreal "\nEnter first line text height [0.250]: "))
(if (= TMPHT1 nil) (setq TXTHT1 0.25) (setq TXTHT1 TMPHT1))
(setq TMPPT2 (polar PT1 RAD (+ HEDRAD 0.25))
PT2 (polar TMPPT2 RAD1 (/ TXTHT1 2.0))
DESTXT (getstring T "\nEnter first description line: "))
(command "TEXT" PT2 TXTHT1 0 DESTXT)
(setq TMPHT2 (getreal "\nEnter text height for remaining lines [0.125]: "))
(if (= TMPHT2 nil) (setq TXTHT2 0.125) (setq TXTHT2 TMPHT2))
(setq TEST 1.0)
(setq INC1 (+ TXTHT2 (* TXTHT2 0.66))
INC INC1)
(while (> TEST 0)
(setq PT3 (polar PT2 RAD1 INC)
DESTXT2 (getstring T "\nEnter next description line: "))
(command "TEXT" PT3 TXTHT2 0 DESTXT2)
(if (= DESTXT2 "") (setq TEST 0) (setq INC (+ INC INC1))))
(setvar "cmdecho" ECHO)
(command)
)